﻿using System;

namespace MessagePack.Formatters
{
	// Token: 0x02000055 RID: 85
	public class ByteArrayFormatter : IMessagePackFormatter<byte[]>
	{
		// Token: 0x06000143 RID: 323 RVA: 0x000056FC File Offset: 0x00003AFC
		private ByteArrayFormatter()
		{
		}

		// Token: 0x06000144 RID: 324 RVA: 0x00005704 File Offset: 0x00003B04
		public int Serialize(ref byte[] bytes, int offset, byte[] value, IFormatterResolver formatterResolver)
		{
			return MessagePackBinary.WriteBytes(ref bytes, offset, value);
		}

		// Token: 0x06000145 RID: 325 RVA: 0x0000570E File Offset: 0x00003B0E
		public byte[] Deserialize(byte[] bytes, int offset, IFormatterResolver formatterResolver, out int readSize)
		{
			return MessagePackBinary.ReadBytes(bytes, offset, out readSize);
		}

		// Token: 0x0400004A RID: 74
		public static readonly ByteArrayFormatter Instance = new ByteArrayFormatter();
	}
}
